﻿using ARchGL.Platform.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace ARchGL.Platform.Mappings.Juneng
{
    public class DocumentLibrarysMapping : IEntityTypeConfiguration<DocumentLibrarys>
    {
        public void Configure(EntityTypeBuilder<DocumentLibrarys> builder)
        {
            //builder.ToTable(MappingConsts.Prefix + nameof(DocumentLibrarys));

            builder.Property(p => p.Name).HasMaxLength(100);
            builder.Property(p => p.Url).HasMaxLength(1000);
            builder.Property(p => p.Extension).HasMaxLength(10); 
        }
    }

    public class DocumentSharesMapping : IEntityTypeConfiguration<DocumentShares>
    {
        public void Configure(EntityTypeBuilder<DocumentShares> builder)
        {
            //builder.ToTable(MappingConsts.Prefix + nameof(DocumentShares));
            builder.Property(p => p.Password).HasMaxLength(10);
            builder.Property(p => p.Url).HasMaxLength(100); 
        }
    }
}
